<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		//读取cookie信息
		Cookie[] cs = request.getCookies();
	    if(cs!=null){
	    	for(Cookie c:cs){
	    		//获取对应的cookie名
	    		String name = c.getName();
	    		//获取cookie值
	    		String value =URLDecoder.decode(c.getValue(),"utf-8");  //中文解码 
	    		
	    		out.println(name+"="+value+"<br/>");
	    	}
	    }
	%>
</body>
</html>